:root {
    --page-side-pad: clamp(20px, 3.2vw, 60px);
}

/* 引入自定义字体 */
@font-face {
    font-family: 'MontserratBold';
    src: url('../fonts/Montserrat-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'MontserratLight';
    src: url('../fonts/Montserrat-Light.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat-Regular';
    src: url('../fonts/Montserrat-Regular.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Semi Bold';
    src: url('../fonts/Montserrat Semi Bold.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    display: block;
}

.layout-wrapper {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    transform-origin: top center;
    min-height: 100vh;
}

/* ================= 主体内容区域 ================= */
.main-content {
    padding-top: 100px;
    padding-bottom: 40px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    flex: 1;
}

/* ================= 图片画廊样式 ================= */
.gallery-container {
    display: grid;
    /* 将 auto-fit 改为固定 3 列，1fr 表示每列等宽 */
    grid-template-columns: repeat(3, 1fr); 
    justify-content: center;
    row-gap: 20px;
    column-gap: 10px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box; /* 防止 padding 撑破容器宽度 */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    
    /* 移除固定的 609px 和 985px */
    width: 100%; 
    /* 保持原来的 609:985 比例，高度自动计算，实现按比例缩放 */
    aspect-ratio: 609 / 985; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
    cursor: pointer;
}

/* 下面的代码保持不变 */
.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.gallery-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.img-default {
    opacity: 1;
    position: relative;
    z-index: 1;
}

.img-hover {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.gallery-item:hover .img-default {
    opacity: 0;
}

.gallery-item:hover .img-hover {
    opacity: 1;
}

/* ================= 分割线样式 ================= */
.divider {
    height:1px;
    background-color: #a3a2a2;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding-left: 35px;
    padding-right: 35px;
    background-clip: content-box;
    margin-top: 25px;
}

/* ================= 响应式适配 ================= */
@media (max-width: 767px) {
    .layout-wrapper {
        width: 100%;
    }

    .main-content {
        padding-top: 80px;
    }

    .gallery-container {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
        max-width: 100%;
    }

    .gallery-item {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 479px) {
    .main-content {
        padding-top: 70px;
    }

    .gallery-container {
        padding: 6px;
        gap: 4px;
    }
}